/**
 * 用户处理模块
 */
(function($ns){
    /**
     * 删除用户
     */
    $ns.deleteUser = function(uid) {
		Qadmin.FW.Dialog.confirm({
		    msg: '确定要删除记录？',
		    ok: function() {
			Qadmin.FW.Ajax.get({
			    url: [QG_CONFIG.PATH + "user/delete.htm?uid=", uid].join("")
			}, function(xhr){
			    location.reload();
			});
		    }
		})
    };
    
    /**
     * 更新用户
     */
    $ns.updateUser = function(uid) {
        Qadmin.FW.Url.goToUrl(QG_CONFIG.PATH + "user/update.htm?uid="+uid);
    };
    
    /**
     * 锁定用户
     */
    $ns.lockUser = function(uid) {
    	Qadmin.FW.Ajax.get({
            url: [QG_CONFIG.PATH + "user/lock.htm?uid=", uid].join("")
        }, function(xhr){
            location.reload();
        });
    }
    
    /**
     * 解除锁定
     */
    $ns.unLockUser = function(uid) {
    	Qadmin.FW.Ajax.get({
            url: [QG_CONFIG.PATH + "user/unLock.htm?uid=", uid].join("")
        }, function(xhr){
            location.reload();
        });
    }
})(using("Qadmin.App.User"));
